dwc_otg: fix several potential crash sources
authorP33M <p33m@github.com>
Fri, 12 May 2017 11:24:00 +0000 (12:24 +0100)
committerRaspbian kernel package updater <root@raspbian.org>
Sun, 8 Oct 2017 01:08:05 +0000 (01:08 +0000)
commit74377d03d70061121cdf882fd346aa36a70c6116
treef46b33b9919b2bea698513a4dd63cd6b0b43b5c1
parent3a951dae87a69f8aff50ba63cb917c1e1cc4c212
dwc_otg: fix several potential crash sources

On root port disconnect events, the host driver state is cleared and
in-progress host channels are forcibly stopped. This doesn't play
well with the FIQ running in the background, so:
- Guard the disconnect callback with both the host spinlock and FIQ
  spinlock
- Move qtd dereference in dwc_otg_handle_hc_fsm() after the early-out
  so we don't dereference a qtd that has gone away
- Turn catch-all BUG()s in dwc_otg_handle_hc_fsm() into warnings.
drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c
drivers/usb/host/dwc_otg/dwc_otg_hcd.c
drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c